/****************************************************************

macros.h
Macros for AWOS Kernel

****************************************************************/

#ifndef ___AWOS_MACROS_H_
#define ___AWOS_MACROS_H_

struct KiMemStats
{
	size_t NumAlloc;	//number of times malloc() has been called
	size_t NumFree;		//number of times free() has been called
	size_t CurAlloc;	//curent allocated memory
	size_t TotalFree;	//total free memory
	size_t MaxFreeBlk;	//maximum amount of free memory in one block
	size_t TotalMemory;	//total memory available
};

void __attribute__((noreturn)) __assert_fail(const char *cond, const char *file, int line, const char *func);
void __fixme(const char *fnname);
void __fixmed(const char *fnname, const char *file, int line);
#ifdef DEBUG
# define assert(cond) do { \
	if(!(cond)) __assert_fail(#cond, __FILE__, __LINE__, __func__); \
} while(0)
#else
# define assert(cond) /* Nothing */
#endif
#define fixme() __fixme(__func__)
#define fixmed() __fixmed(__func__, __FILE__, __LINE__)

#endif // #ifndef ___AWOS_MACROS_H_
